home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / prevact / data1.cab / Example_Files / Example / TestForm.frm (.txt) next >
Encoding:
Visual Basic Form  |  1998-07-05  |  6.3 KB  |  185 lines

  1. VERSION 5.00
  2. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.1#0"; "RICHTX32.OCX"
  3. Object = "{F8B79F91-138F-11D2-8AC4-FB7E6B9E0862}#1.0#0"; "PreviewNow.ocx"
  4. Begin VB.Form TestForm 
  5.    Caption         =   "Test form"
  6.    ClientHeight    =   4935
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   6150
  10.    BeginProperty Font 
  11.       Name            =   "Arial"
  12.       Size            =   8.25
  13.       Charset         =   0
  14.       Weight          =   400
  15.       Underline       =   0   'False
  16.       Italic          =   0   'False
  17.       Strikethrough   =   0   'False
  18.    EndProperty
  19.    LinkTopic       =   "Form1"
  20.    ScaleHeight     =   4935
  21.    ScaleWidth      =   6150
  22.    StartUpPosition =   2  'CenterScreen
  23.    Begin PNow.PreviewNow PreviewNow1 
  24.       Left            =   840
  25.       Top             =   2160
  26.       _ExtentX        =   582
  27.       _ExtentY        =   609
  28.    End
  29.    Begin PNow.PreviewDate PreviewDate1 
  30.       Left            =   120
  31.       Top             =   2160
  32.       _ExtentX        =   714
  33.       _ExtentY        =   609
  34.    End
  35.    Begin PNow.PreviewFont PreviewFont1 
  36.       Left            =   840
  37.       Top             =   1680
  38.       _ExtentX        =   714
  39.       _ExtentY        =   609
  40.    End
  41.    Begin PNow.PreviewFind PreviewFind1 
  42.       Left            =   240
  43.       Top             =   1560
  44.       _ExtentX        =   397
  45.       _ExtentY        =   370
  46.    End
  47.    Begin PNow.Messaging Messaging1 
  48.       Left            =   360
  49.       Top             =   960
  50.       _ExtentX        =   1958
  51.       _ExtentY        =   900
  52.    End
  53.    Begin RichTextLib.RichTextBox RichTextBox1 
  54.       Height          =   1335
  55.       Left            =   120
  56.       TabIndex        =   7
  57.       Top             =   3360
  58.       Width           =   5775
  59.       _ExtentX        =   10186
  60.       _ExtentY        =   2355
  61.       _Version        =   327681
  62.       ScrollBars      =   3
  63.       TextRTF         =   $"TestForm.frx":0000
  64.    End
  65.    Begin VB.CommandButton Command1 
  66.       Caption         =   "&Close"
  67.       Height          =   330
  68.       Index           =   5
  69.       Left            =   4440
  70.       TabIndex        =   6
  71.       Top             =   2880
  72.       Width           =   1455
  73.    End
  74.    Begin VB.CommandButton Command1 
  75.       Caption         =   "PreviewNow"
  76.       Height          =   330
  77.       Index           =   4
  78.       Left            =   2400
  79.       TabIndex        =   5
  80.       Top             =   2880
  81.       Width           =   1455
  82.    End
  83.    Begin VB.CommandButton Command1 
  84.       Caption         =   "PreviewDate"
  85.       Height          =   330
  86.       Index           =   3
  87.       Left            =   2400
  88.       TabIndex        =   4
  89.       Top             =   2400
  90.       Width           =   1455
  91.    End
  92.    Begin VB.CommandButton Command1 
  93.       Caption         =   "PreviewFont"
  94.       Height          =   330
  95.       Index           =   2
  96.       Left            =   2400
  97.       TabIndex        =   3
  98.       Top             =   1920
  99.       Width           =   1455
  100.    End
  101.    Begin VB.CommandButton Command1 
  102.       Caption         =   "PreviewFind"
  103.       Height          =   330
  104.       Index           =   1
  105.       Left            =   2400
  106.       TabIndex        =   2
  107.       Top             =   1440
  108.       Width           =   1455
  109.    End
  110.    Begin VB.CommandButton Command1 
  111.       Caption         =   "Messaging"
  112.       Height          =   330
  113.       Index           =   0
  114.       Left            =   2400
  115.       TabIndex        =   0
  116.       Top             =   960
  117.       Width           =   1455
  118.    End
  119.    Begin VB.Label Label1 
  120.       Alignment       =   2  'Center
  121.       Caption         =   "Select the example that you wish to view, when finished click on the &Close button."
  122.       Height          =   495
  123.       Left            =   240
  124.       TabIndex        =   1
  125.       Top             =   240
  126.       Width           =   5655
  127.    End
  128. Attribute VB_Name = "TestForm"
  129. Attribute VB_GlobalNameSpace = False
  130. Attribute VB_Creatable = False
  131. Attribute VB_PredeclaredId = True
  132. Attribute VB_Exposed = False
  133. Private Sub Command1_Click(Index As Integer)
  134.     Dim ReturnType As Long
  135.     Select Case Index
  136.         Case 0 ' messaging
  137.             Messaging1.Buttons = msOKCancel
  138.             Messaging1.HelpButton = False
  139.             Messaging1.PictureType = msInformation
  140.             Messaging1.Text = "This is an example of the messaging control."
  141.             Messaging1.Title = "Message title"
  142.             ReturnType = Messaging1.Message
  143.             MsgBox (ReturnType)
  144.         Case 1 ' previewfind
  145.             PreviewFind1.Startup = cf_Centerscreen
  146.             PreviewFind1.MatchCase = True
  147.             PreviewFind1.PatternMatch = True
  148.             PreviewFind1.ShowPage = FindPage
  149.             PreviewFind1.ShowFind
  150.         Case 2 ' previewfont
  151.             PreviewFont1.FontBold = True
  152.             PreviewFont1.FontTitle = "Example font"
  153.             PreviewFont1.Startup = Centerscreen
  154.             PreviewFont1.ShowFont
  155.             If (PreviewFont1.CancelFont = True) Then
  156.                 MsgBox ("The cancel button was pressed.")
  157.             Else
  158.                 MsgBox (PreviewFont1.FontName & "   " & PreviewFont1.FontSize)
  159.             End If
  160.         Case 3 ' previewdate
  161.             PreviewDate1.Startup = Centerscreen
  162.             PreviewDate1.ShowDate
  163.             If (PreviewDate1.CancelDate = True) Then
  164.                 MsgBox ("The cancel button was pressed.")
  165.             Else
  166.                 MsgBox (PreviewDate1.DateFormat)
  167.             End If
  168.         Case 4 ' previewnow
  169.             PreviewNow1.Text = RichTextBox1.Text
  170.             PreviewNow1.TextRTF = RichTextBox1.TextRTF
  171.             PreviewNow1.ShowPreview
  172.         Case 5 ' close
  173.             Unload Me
  174.     End Select
  175. End Sub
  176. Private Sub PreviewFind1_FindIt(FindWord As String, MatchCase As Boolean, PatternMatch As Boolean, WholeWord As Boolean, Search As Integer)
  177.     ' place code here to handle the event
  178. End Sub
  179. Private Sub PreviewFind1_ReplaceAll(FindWord As String, ReplaceWord As String, MatchCase As Boolean, PatternMatch As Boolean, WholeWord As Boolean, Search As Integer)
  180.     ' place code here to handle the event
  181. End Sub
  182. Private Sub PreviewFind1_ReplaceIt(FindWord As String, ReplaceWord As String, MatchCase As Boolean, PatternMatch As Boolean, WholeWord As Boolean, Search As Integer)
  183.     ' place code here to handle the event
  184. End Sub
  185.